package com.lp.product.client;

import com.lp.product.common.DecreaseStockInput;
import com.lp.product.common.ProductInfoOutput;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author LIPENGAK
 * @Description: 类描述
 * @date 2018-10-30 17:38
 */
@FeignClient(name="eureka-product")
public interface ProductClient {

    @GetMapping("/product/list")
    String getProductList();

    @PostMapping("/product/listForOrder")
    public List<ProductInfoOutput> listForOrder(@RequestBody List<String> productIds);

    @PostMapping("/product/decreaseStock")
    public void decreaseStock(@RequestBody List<DecreaseStockInput> cartDTOS);

}
